def prime_number(n):
    for i in range(1,n):
        j=2
        while j < i:
            k=i%j
            if k == 0:
                break
            j+=1
        if j == i:
            yield i
p=prime_number(int(input('Enter a number: ')))
while True:
    try:
        print(next(p),end=" ")
    except StopIteration:
        print('\n')
        break
#<===============================================>
def fibonacci(n):
    array=[]
    a=0;b=1
    while len(array) < n:
        array.append(a)
        a,b=b,a+b
        yield array
f=fibonacci(int(input('Enter a number: ')))
while True:
    try:
        print(next(f),end="\n")
    except StopIteration:
        break
#<================================================>
def mutiple_6(n):
    for i in range(1,n):
        if i%6 == 0:
            yield i
m=mutiple_6(int(input('Enter a number: ')))
while True:
    try:
        print(next(m),end=" ")
    except StopIteration:
        print('\n')
        break
